package com.CST.entity.zx;


import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Objects;

@Data
@ApiModel(value = "项目信息")
@TableName("ZX_PROJECT")
//@Accessors(chain = true)
public class ZX_Project implements Serializable {
    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    @ExcelIgnore
    private Long id;

    @ApiModelProperty(value = "项目编码")
    @ExcelProperty("项目编码")
    private String projectCode;

    @ApiModelProperty(value = "财务编码")
    @ExcelProperty("财务编码")
    private String financialCode;

    @ApiModelProperty("项目简称")
    @ExcelProperty("项目简称")
    private String financialName;

    @ApiModelProperty(value = "项目类别编号")
    @ExcelProperty("项目类别编号")
    private String entryId;

    @ApiModelProperty(value = "项目类别")
    @ExcelProperty("项目类别")
    private String entryName;

    @ApiModelProperty(value = "项目全称")
    @ExcelProperty("项目全称")
    private String projectInfo;//全称

    @ApiModelProperty(value = "工号")
    @ExcelProperty("工号")
    private String userId;

    @ApiModelProperty(value = "项目负责人")
    @ExcelProperty("项目负责人")
    private String userName;

    @ApiModelProperty(value = "科室编号")
    @ExcelProperty("科室编号")
    private String deptCode;

    @ApiModelProperty(value = "科室名称")
    @ExcelProperty("科室名称")
    private String deptName;

//    @ApiModelProperty(value = "总金额")
//    @ExcelProperty("总金额")
//    private BigDecimal total;

    @ApiModelProperty(value = "往期收入")
//    @ExcelProperty("往期收入")
    private BigDecimal income;

    @ApiModelProperty(value = "是否封存")
//    @ExcelProperty("是否封存")
    private Integer isClose;//封存

    @ApiModelProperty(value = "是否删除")
//    @ExcelProperty("是否删除")
    private Integer isDelete;

    @ApiModelProperty(value = "创建时间")
//    @ExcelProperty("创建时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
//    @ExcelProperty("更新时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDateTime updateTime;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ZX_Project that = (ZX_Project) o;
        return Objects.equals(financialCode, that.financialCode);
    }

    @Override
    public int hashCode() {
        return Objects.hash(financialCode);
    }


}
